Skip to content

add selectable (but static) SFP Base-X support - #18

Open
moshevds wants to merge 1 commit into
we-are-mono:masterfrom
moshevds:static-1g-support
Open

add selectable (but static) SFP Base-X support#18
moshevds wants to merge 1 commit into
we-are-mono:masterfrom
moshevds:static-1g-support

Conversation

@moshevds

Copy link
Copy Markdown

(This replaces #13 because github closed my PR, and I don't know how to reopen it.)

This adds support for "downgrading" either of the SFP+ ports to SFP ports with a firmware update.

There are 3 places where the port type must be configured:

  • The RCW: SGMII instead of XFI
  • The retimer: enabling CDR bypass
  • The devicetree: modifying "phy-connection-type", and "fixed-link"

The way that this patch works is by having U-Boot inspect the RCW, and perform fixups for the retimer and devicetree to match what it finds.

This means that the RCW is the only difference between firmware images. SFP0TYPE and SFP1TYPE can be set in site.conf (or elsewhere) to either "10g" (the default) or "1g" to determine what RCW will be included. Compared to the previous PR, I removed support for 1g+1g, and also limited 10g+1g to have the rightmost port as 1g. The two removed modes did not work reliably for different reasons. (But can very likely be added with a different mechanism.)

@moshevds
moshevds force-pushed the static-1g-support branch 4 times, most recently from d200120 to 9b7aa44 Compare June 28, 2026 12:08
@moshevds
moshevds force-pushed the static-1g-support branch 6 times, most recently from 506dff6 to 269900b Compare August 7, 2026 11:34
@moshevds
moshevds marked this pull request as draft August 7, 2026 11:41
@moshevds
moshevds force-pushed the static-1g-support branch 2 times, most recently from 5f5f0b1 to 18571d9 Compare August 7, 2026 12:15

Upstream-Status: Inappropriate [product-specific]
---
.../cpu/armv8/fsl-layerscape/ls1046a_serdes.c | 2 +

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The hunk for this line is missing.

@moshevds
moshevds marked this pull request as ready for review August 7, 2026 13:21
@tomazzaman

Copy link
Copy Markdown

One comment on the two patch files: they have a git format-patch header on a
quilt body (Index: / ==== / .orig paths instead of diff --git a/… b/…).
It applies, but git am won't take it, the newly created files lose their
new file mode, and there's no Signed-off-by.

More importantly, I think that's how a hunk went missing. 0008's diffstat says:

  .../cpu/armv8/fsl-layerscape/ls1046a_serdes.c |   2 +
  board/freescale/gateway_dk/gateway_dk.c       | 194 ++++++++++++++++++
  2 files changed, 196 insertions(+)

but the body only contains gateway_dk.c — the ls1046a_serdes.c change
(the 0x1333 table entry, I assume?) isn't in there. Header from the original
commit, body from a later refresh.

Regenerating both patches with git format-patch against a tree at
NXP_LF_SRCREV_UBOOT / NXP_LF_SRCREV_RCW should fix the format and bring
the missing hunk back in one go.

@moshevds

moshevds commented Aug 7, 2026

Copy link
Copy Markdown
Author

More importantly, I think that's how a hunk went missing. [...] the ls1046a_serdes.c change (the 0x1333 table entry, I assume?) isn't in there.

After creating the initial PR, I have been using quilt to manage the patchset. It hadn't occurred to me to check the generated patch header. The change in ls1046a_serdes.c was actually the addition of an 0x3133 entry, which I removed at a later point because it's not fully correct that way. 0x1333 exists out of the box in the NXP upstream sources. So, there is no hunk missing, the metadata was just out of date.

I'll re-generate both patches with git am to make sure the metadata is up to date, since quilt doesn't touch that.

@moshevds
moshevds marked this pull request as draft August 7, 2026 14:00
@moshevds
moshevds force-pushed the static-1g-support branch from 18571d9 to 7d13b3b Compare August 7, 2026 14:00
@moshevds
moshevds marked this pull request as ready for review August 7, 2026 15:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants